#include "Scene10.hpp"

Scene10::Scene10() {
    b2Vec2 vertices[10];
    vertices[0].Set(-9.0f, -5.0f);
    vertices[1].Set(7.0f, -5.0f);
    vertices[2].Set(7.0f, 2.0f);
    vertices[3].Set(9.0f, 2.0f);
    vertices[4].Set(9.0f, 4.0f);
    vertices[5].Set(7.0f, 4.0f);
    vertices[6].Set(7.0f, 5.0f);
    vertices[7].Set(-7.0f, 5.0f);
    vertices[8].Set(-7.0f, -3.0f);
    vertices[9].Set(-9.0f, -3.0f);

    this->createRoom(10, vertices, 10);

    b2Vec2 platformVertices[2];
    platformVertices[0].Set(6.0f, 2.0f);
    platformVertices[1].Set(7.0f, 2.0f);

    this->createPlatform(platformVertices, 2);

    this->start = this->createDoor(-7.0f, -4.0f, -1.0f);
    this->exit = this->createDoor(7.0f, 3.0f, 1.0f);
    this->exit->setState(false);
    this->createExit(8.0f, 3.0f);
    this->hero = this->createHero(-9.0f + HeroElement::WIDTH / 2.0f, -5.0f + HeroElement::HEIGHT / 2.0f);

    // Flashes to the exit.
    this->createFlash(0.0f, -5.0f, 0.0f, b2Vec2(500.0f, 650.0f));
    this->createFlash(7.0f, 0.0f, b2_pi / 2.0f, b2Vec2(-1000.0f, 450.0f));
    this->createFlash(-7.0f, 2.0f, -b2_pi / 2.0f, b2Vec2(1000.0f, 420.0f));
}
